The present technique relates to an apparatus and method for controlling debugging of program instructions including a transaction.
There may be provided data processing systems supporting transactions in which a number of program instructions execute to generate updates to state data and to commit the updates if the transaction completes without a conflict. Since the updates are only committed if the transaction completes without a conflict, such updates are also referred to herein as speculative updates until such time as they are committed. Such transactions may be used, for example, to facilitate multi-threaded processing using a shared memory in which transactions using data values within the shared memory may be allowed to proceed in parallel relying upon the ability to avoid committing speculative updates should a conflict arise between memory accesses. In most cases, such conflicts do not arise and accordingly the parallel processing proceeds efficiently without the need to support the overhead of more rigid mechanisms, such as the use of memory locks, and yet when a conflict does arise it is possible to recover as the speculative updates to state data will not have been committed.
Performing debugging of such transactions can be problematic, since inspecting the state of the processor executing the transaction whilst the transaction is still in progress can introduce a probe effect that influences the execution of the remainder of the transaction. The probe effect can be significant, and indeed in some situations the debugging activity can cause the transaction to abort, which prevents making progress with the performance of the transaction.
One known debugging mechanism is referred to as single stepping. In accordance with a single stepping mechanism, the processing circuitry is arranged to execute a single instruction and then initiate a debug event following execution of that instruction. This can be repeated for each instruction in turn, and hence enables the debugger to analyse the state of the processor between execution of every instruction. However, whilst such a single stepping mechanism can be very useful, it can be particularly problematic when debugging transactions, since certain probe effects are likely to be introduced that will influence execution of the transaction. Indeed, in some situations the act of single stepping may cause the transaction to abort.